package com.compty.paint.domain;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 * 
 * @Todo:拍卖出价记录
 * @CreateTime:2012-2-14 下午02:22:28
 */
@Entity
@Table(name = "t_bid_record")
public class BidRecord   implements java.io.Serializable  {

	private static final long serialVersionUID = -6604805237846429609L;
	
	private Long id;
	
	/************ 顾客信息 ****************/
	private CustomerInfo customerInfo;
	
	/************ 出价时间 ****************/
	private Date bidTime;
	
	/************ 拍品信息 ****************/
	private Bid bid;
	
	private double bidPrice;

	@Id
	@GeneratedValue
	@Column(name = "id", unique = true, nullable = false)
	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name="customer_id")
	public CustomerInfo getCustomerInfo() {
		return customerInfo;
	}

	public void setCustomerInfo(CustomerInfo customerInfo) {
		this.customerInfo = customerInfo;
	}

	@Column(name = "bid_time")
	public Date getBidTime() {
		return bidTime;
	}

	public void setBidTime(Date bidTime) {
		this.bidTime = bidTime;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name="bid_id")
	public Bid getBid() {
		return bid;
	}

	public void setBid(Bid bid) {
		this.bid = bid;
	}

	@Column(name = "bid_price")
	public double getBidPrice() {
		return bidPrice;
	}

	public void setBidPrice(double bidPrice) {
		this.bidPrice = bidPrice;
	}

}
